#include "attrib.h"
#include "list.h"

#ifndef DICT_H
#define DICT_H

typedef list_p dict_p;

dict_p dict_new();
void dict_free(dict_p dict);

dict_p dict_add(dict_p dict, attrib_p attrib);
dict_p dict_add_new(dict_p dict, char *key, char *value);
attrib_p dict_set_key(dict_p dict, char *key, char *value);
attrib_p dict_get(dict_p dict);

attrib_p dict_remove(dict_p dict);
list_p dict_remove_attribs(attrib_p(*func)(dict_p,char*), dict_p dict, char *s);
list_p dict_remove_keys(dict_p dict, char *key);
list_p dict_remove_values(dict_p dict, char *value);

int dict_is_empty(dict_p dict);
void dict_to_first(dict_p dict);
attrib_p dict_next(dict_p dict);
int dict_at_last(dict_p dict);

attrib_p dict_find(char*(*func)(attrib_p), dict_p dict, char *s);
attrib_p dict_find_next_key(dict_p dict, char *key);
attrib_p dict_find_next_value(dict_p dict, char *value);

list_p dict_find_all(attrib_p(*func)(dict_p,char*), dict_p dict, char *str);
list_p dict_find_all_keys(dict_p dict, char *key);
list_p dict_find_all_values(dict_p dict, char *value);

attrib_p dict_find_next_match(dict_p dict, char *key, char *value);
list_p dict_find_all_matches(dict_p dict, char *key, char *value);

#endif /* DICT_H */

